#include <iostream>
#include <stdio.h>
using namespace std;

class A{
public:
	A()
	{
		printf("A()\n");
	}
	A(int a=0,int b=0)
	{
		this->a=a;
		this->b=b;	
	}
	~A()
	{
		printf("~A()\n");
	}

	void getValue()
	{
		printf("%d %d\n",a,b);
	}
	void getC()
	{
		printf("%p\n",&c);
		printf("%s\n",c);
	}
	void getD()
	{
		printf("%p\n",&d);
		printf("%d\n",*d);
	}
private:
	int a;
	int b;
public:
	char *c;
	int *d;
};
	
int main()
{
	A *a1=new A(13,14);
	a1->getValue();
	printf("%p\n",a1);
	
	a1->c=new char[10];
	a1->c="5201314";
	a1->getC();

	a1->d=new int(520);
	a1->getD();
	
	delete a1;
	
	return 0;
}
